// ml:run = $bin < input
#include <iostream>
#include <string>
#include <cmath>
#include <iomanip>

int const up = 1000000;
long double ans[up + 4];
long double const pi = acos(-1.0);

int main()
{
    std::ios_base::sync_with_stdio(false);
    long double sum = 0;
    for (long long i = 1; i <= up; i++) {
        sum += 1.0 / (long double)(i * i);
        ans[i] = sum;
    }
    std::string s;
    while (std::cin >> s) {
        if (s.size() > 7) {
            std::cout << "1.64493\n";
            continue;
        }
        int t = std::stoi(s);
        if (t > up) {
            std::cout << "1.64493\n";
            continue;
        }
        std::cout << std::fixed << std::setprecision(5) << ans[t] << "\n";
    }
}

